import { Component } from '@angular/core';
import { NavController} from 'ionic-angular';
//import {ServiceGuaranteePage} from "../../pages/service-guarantee/service-guarantee";
/**
 * Generated class for the FootComponent component.
 *
 * See https://angular.io/api/core/Component for more info on Angular
 * Components.
 */
@Component({
  selector: 'foot',
  templateUrl: 'foot.html'
})
export class FootComponent {
  public contactList =[];
  public menuShow = false;
  constructor(public navCtrl: NavController) {
    this.contactList=[
      {"id" : 1,"title" : "中禄简介","fun" :"goCompanyProfile", "ionic":"icon-jianjie"},
      {"id" : 2,"title" : "服务保障","fun" :"goService", "ionic":"icon-fuwu"},
      {"id" : 3,"title" : "成功案例","fun" :"goSuccessCase", "ionic":"icon-chenggong"},
      {"id" : 4,"title" : "中禄业务","fun" :"", "ionic":"icon-yewu",
      list:[{"id" : 1,"fun" :"goRegister", "name":"公司注册"},
        {"id" : 2,"fun" :"goLicenseagent", "name":"营业执照代办"},
        {"id" : 3,"fun" :"goLogout", "name":"公司注销"},
        {"id" : 4,"fun" :"goCompanyChange", "name":"公司变更"}]}
    ];
  }
  /*************************页面跳转start*************************/
  menuGoFun(funName){
    if(funName ==""){
      this.displayMenu();
    }else{
      this[funName]();
    }
  }
  goService(){
    this.navCtrl.push('ServiceGuaranteePage');//服务保障
  }
  goCompanyProfile(){
    this.navCtrl.push('CompanyProfilePage');//简介
  }
  goLogout(){
    this.navCtrl.push('CompanyCancelPage');//公司注销
  }
  goRegister(){
    this.navCtrl.push('HomePage');//公司注册
  }
  goCompanyChange(){
    this.navCtrl.push('CompanychangePage');//公司变更
  }
  goLicenseagent(){
    this.navCtrl.push('LicenseagentPage');//营业执照代办
  }
  displayMenu(){
    this.menuShow = !this.menuShow;//菜单切换
  }
  goSuccessCase(){
    this.navCtrl.push('ServicecasePage');//服务案例
  }
}
